package com.dream.testtubebaby.data.doctor;

import java.io.Serializable;

/**
 * Created by Administrator on 15-8-2.
 */
public class SearchPoi implements Serializable{


    public SearchPoi() {

    }

    public static enum Type{
        HOSPITAL(1), DOCTOR(2),ALL(3);

        private int value;
        Type(int value) {
            this.value = value;
        }
        public int getValue(){
            return value;
        }


    };

    private int id;
    private String name;
    private Type type;

    public SearchPoi(int id, String name, Type type) {
        this.id = id;
        this.name = name;
        this.type = type;
    }
    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public Type getType() {
        return type;
    }

    public Type convertType(int value) {
        for(Type type : Type.values()){
            if(type.getValue() == value) {
                return type;
            }
        }
        return Type.DOCTOR;
    }

}
